
$('.tou').load('head.html')
$('.wei').load('footer.html')
$.ajax({
    type: "POST",
    url: "http://localhost/lian/pubg/php/list.php",
    data: {},
    success: function (data) {
        var dd = JSON.parse(data)
        var html = ""

        dd.data.forEach(({ id, price, name, img }) => {
            console.log(id);
            html += ` <li>
                        <a href="xiangqin.html?id=${id}" target="_blank" class="good-link">
                            <div class="ico-comm ">
                                <span class="mark-txt"></span>
                            </div>
                            <img src="${img}"
                                width="280" height="268" alt="商品图">
                            <div class="good-info">
                                <p class="good-name">${name}</p>
                                <div class="good-pri">
                                    <span class="new-pri">￥${price}.00</span>
                                    <span class="old-pri">￥499.00</span>
                                </div>
                            </div>
                        </a>
                    </li>`

        });
        $("#dj_goods_ul").html(html)


    }
})
